import { useEffect } from 'react';

const useAsyncEffect = (asyncEffect: () => void) => {
    useEffect(() => {
        const asyncFunction = async () => {
            await asyncEffect() ;
        } ;
        asyncFunction();
    }, []);
};

export default useAsyncEffect;
